/*
 * File:   TUObject.cpp
 * Author: msautte
 *
 * Created on April 24, 2011
 */

#include "TigerUpdate.h"

TUObject::TUObject(TUObject *other){
    if(other == NULL){
        myObjectType = TUOBJECT;
    } else {
        myObjectType = other->myObjectType;
    }
}

TUObject::~TUObject(){
    delete this;
}

bool TUObject::operator==(TUObject* other){
    if(myObjectType == TUOBJECT || other->myObjectType == TUOBJECT)
        return false;
    return myObjectType == other->myObjectType;
}

bool TUObject::operator!=(TUObject* other){
    return !(this == other);
}

bool TUObject::isAFile(){
    return myObjectType == TUFILE;
}
bool TUObject::isAMessage(){
    return myObjectType == TUMESSAGE;
}
bool TUObject::isASecurity(){
    return myObjectType == TUSECURITY;
}
